#include"../base/public.h"
#include"../include/tool.h"

namespace monopoly{
void Bomb::Trigger(Player& player,Map& global_map) const{
    Hospital hospital(14,HOSPITAL);
    player.GoToHospital(global_map);
}
void Barricade::Trigger(Player& player) const{
    player.can_advance = false;
}
void Doll::Trigger(Player& player,Map& global_map) const{
    int8_t player_cur_pos = player.CurPlace()->getPosition();
    for(int tmp = player_cur_pos,count = 10;count > 0;tmp++,count--){
        if(!global_map.PlacePtrVector[tmp%70]->IsEmpty()){
            global_map.PlacePtrVector[tmp%70]->SetEmpty();
        }
    }
}
}// namespace monopoly